home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1999 #2
/
Amiga Plus CD - 1999 - No. 2.iso
/
System-Boost
/
Grafik
/
AmiCAD
/
ARexx_english
/
EditScript.AmiCAD
< prev
next >
Wrap
Text File
|
1998-06-17
|
1KB
|
46 lines
/* EditScript.AmiCAD, Version 1.00e © R.Florac */
/* This script is called for loading a script file in a text editor while working with AmiCAD */
/* Push the CONTROL key while selecting an ARexx menu with AmiCAD
* to call it. The script must be in the AmiCAD/ARexx directory and
* must have the .AmiCAD extension to his name.
* This script is for my text editor Amitex, adapt it
* to any other text editor to suit to your needs. */
parse arg script /* reads the script name */
if script = "" then exit
signal on error /* for intercepting the errors */
signal on syntax
options results
port = ADDRESS() /* reads the name of AmiCAD ARexx port */
address command
if ~show(p, "AMITEX") then do /* could be better (AMITEX0, AMITEX1...) */
f=0 /* No window allready opened */
'run > nil:' "c:AmiTex" /* loading the editor */
waitforport "AMITEX"
end
else f=1 /* the editor was allready running */
ADDRESS (AMITEX)
cr='0a'x
if f=1 then 'NEW("")' /* ask for opening a new window */
'LOAD("'script'.AmiCAD")' /* loads the script file */
exit
/* Traitement des erreurs, interruption du programme */
syntax:
address (port)
erreur=RC
'MESSAGE("Script EditScript.AmiCAD :"+CHR(10)+"Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
address (port)
'MESSAGE("Script EditScript.AmiCAD :"+CHR(10)+"Error in line 'SIGL'")'
exit